package cn.zzuzhm.transaction.tx;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service("cashier")
public class CashierImpl implements Cashier {

	@Autowired
	private BookShopService bookShopService;
	
	@Transactional
	@Override
	public void checkout(int id, List<String> bids) {
		for (String bid : bids) {
			bookShopService.purchase(id, bid);
		}
	}

}
